﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Data.SqlClient;
using formworks.DBO;

namespace formworks.Power
{
    /// <summary>
    /// 权限基类
    /// 根据用户权限重写了，增删改查操作的限制
    /// </summary>
    public class Powerful : DBSession
    {
        public bool isQuery { get; set; }

        public Powerful(string connectionString) : base(connectionString)
        {
            isQuery = true;
        }

        public Powerful(SqlConnection connection) : base(connection)
        {
            isQuery = true;
        }

        //public override List<T> createQuery<T>(string sql)
        //{
        //    if (Settings.isQuery)
        //        return base.createQuery<T>(sql);
        //    else
        //    {
        //        throw new Exception("用户没有查询权限！");
        //        return null;
        //    }
        //}//

    }//
}
